package com.min.gps.service;

import javax.net.SocketFactory;
import java.io.*;
import java.net.Socket;

/**
 * Created by mincx
 *
 * 报文解析----socketClient----->后端服务
 */
public class BackClient {

    Socket socket=new Socket("127.0.0.1", 1123);
   public BackClient() throws IOException {
    }


    public  void  sendMessage(String str){
     try {
            BufferedReader buf = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            PrintStream out = new PrintStream(socket.getOutputStream());
            out.println(str);
         } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
